import * as network from '@/utils/request';

import { jobs } from '../../config/Apis';



export async function getJobsNames(params: any): Promise<any> {
    return network.post(jobs.jobsName, {
        data: params,
        requestType: 'form'
    });
}

export async function getJobsList(params: any): Promise<any> {
    return network.post(jobs.jobsList, {
        data: params,
        requestType: 'form',
    });
}

export async function getJobDetail(params: any): Promise<any> {
    return network.post(jobs.jobDetail, {
        data: params,
        requestType: 'form',
    });
}

export async function addJob(params: any): Promise<any> {
    return network.post(jobs.addJob, {
        data: params,
        requestType: 'form',
    });

}

export async function updateJob(params: any): Promise<any> {
    return network.post(jobs.updateJob, {
        data: params,
        requestType: 'form',
    });
}

// 权限列表
export const limitEnum = [
    { key: 'overview', value: 10, },
    { key: 'order', value: 11, },
    { key: 'delivery', value: 1101, },
    { key: 'deliveryAll', value: 110101, },
    { key: 'deliveryAll', value: 110102, },
    { key: 'deliveryAll', value: 110103, },
    { key: 'deliveryAll', value: 110104, },
    { key: 'deliveryAll', value: 110105, },
    { key: 'deliveryAll', value: 110106, },
    { key: 'basicConfig', value: 12, },
    { key: 'postHouse', value: 1201, },
    { key: 'postHouseAll', value: 120101, },
    { key: 'postHouseAll', value: 120102, },
    { key: 'imei', value: 1204, },
    { key: 'imeiAll', value: 120401, },
    { key: 'imeiAll', value: 120402, },
    { key: 'imeiAll', value: 120403, },
    { key: 'num', value: 1202, },
    { key: 'numAll', value: 120201, },
    { key: 'numAll', value: 120202, },
    { key: 'numAll', value: 120203, },
    { key: 'numAll', value: 120204, },
    { key: 'company', value: 1203, },
    { key: 'companyAll', value: 120301, },
    { key: 'companyAll', value: 120302, },
    { key: 'companyAll', value: 120303, },
    { key: 'cabinet', value: 1205, },
    { key: 'cabinetAll', value: 120501, },
    { key: 'cabinetAll', value: 120502, },
    { key: 'cabinetAll', value: 120503, },
    { key: 'cabinetAll', value: 120504, },
    { key: 'agent', value: 1206, },
    { key: 'agentAll', value: 120601, },
    { key: 'agentAll', value: 120602, },
    { key: 'agentAll', value: 120603, },
    { key: 'agentAll', value: 120604, },
];